import Foundation

public class TaskListManager {
    private var checkedItems: Set<Int> = []
    
    public init() {}
    
    public func toggleItem(_ index: Int) {
        if checkedItems.contains(index) {
            checkedItems.remove(index)
        } else {
            checkedItems.insert(index)
        }
    }
    
    public func isItemChecked(_ index: Int) -> Bool {
        return checkedItems.contains(index)
    }
    
    public func reset() {
        checkedItems.removeAll()
    }
} 